package com.junxonline.instant.dao.entity.model.terminal;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 终端分组关联表实体类
 *
 * @author JunX
 * @date 2021-09-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "th_group")
public class TerminalGroup {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 终端ID
     */
    @TableField(value = "terminal_id")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long terminalId;

    /**
     * 分组ID
     */
    @TableField(value = "group_id")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long groupId;

    public TerminalGroup(Long terminalId, Long groupId) {
        this.terminalId = terminalId;
        this.groupId = groupId;
    }

}
